package com.senyint.hip.fhir.interceptor;

import ca.uhn.fhir.rest.client.api.IClientInterceptor;
import ca.uhn.fhir.rest.client.api.IHttpRequest;
import ca.uhn.fhir.rest.client.api.IHttpResponse;

import java.io.IOException;

/**
 * *******description*******
 * <p>
 * *************************
 *
 * @author ChenPan
 * @date 2018/10/30 11:17
 */
public class BufferResponseInterceptor implements IClientInterceptor {

    @Override
    public void interceptRequest(IHttpRequest theRequest) {
        // nothing
    }

    @Override
    public void interceptResponse(IHttpResponse theResponse) throws IOException {
        theResponse.bufferEntity();
    }
}
